package homework0306;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        File file=new File("./txt");
        String name=file.getName();
        System.out.println(name);
        long len=file.length();
        System.out.println(len);

        File dir=new File("./");
        if (dir.exists()){
            System.out.println("该目录已存在");
        }else {
            dir.mkdirs();
        }
        System.out.println("目录已创建");



    }
}
